//select table
$("#selectable")
		.selectable(
				{
					stop : function() {
						var result = $("#select-result").empty();
						var del = "";
						var editid = "";
						var i = 0;
						result.append(" &nbsp;&nbsp;\u7b2c");
						$(".ui-selected", this).each( function() {
							i = i + 1;
							var index = $("#selectable li").index(this);
							del = del + $(this).attr("id") + ","
							editid = $(this).attr("id");
							result.append(" #" + (index + 1));
						});
						del = del + "-1"
						result
								.append(" \u88ab\u9009\u4e2d <a id='del' style='cursor:pointer;' >\u5220\u9664</a>");
						if (i == 1) {
							result
									.append("   <a id='editbutton' href='../news-edit-"+editid+"/' >\u7f16\u8f91</a>");
					 
							 
						}
						$("#del").click( function() {
							$.post("../news-del/", {
								ids : del
							}, function(data) {
								// alert(data);
									// need reload list
									window.location.reload();
								});
						});
						setTimeout( function() {
							$("#effect:hidden").removeAttr('style').hide()
									.fadeIn();
						}, 1000);
					}
				})
 